package com.zjj2;

import org.apache.log4j.Logger;

public class Log4jTest {
    public static org.apache.log4j.Logger log = Logger.getLogger(Log4jTest.class.getName());

    public static String test(String msg) {
        // 记录debug级别的信息
        log.debug(log.getClass().getName()+" This is debug message."+msg);
        // 记录info级别的信息
        log.info(log.getClass().getName()+" This is info message."+msg);
        // 记录error级别的信息
        log.error(log.getClass().getName()+" This is error message."+msg);
        return "";
    }
}
